package com.enjoyor.soa.traffic.ping.efoms.pojo;

import java.util.List;

import com.enjoyor.soa.traffic.util.helper.TimeHelper;

/**
 * ping消息体
 * @ClassNamePingResultPojo
 * @Description TODO
 * @Author ZSY
 * @Date 2019/1/31 8:34
 * @Version 1.0
 **/
public class PingResultPojo{
	
	/**
     * 设备类别编号
     */
    private String devCategoryCode;
    /**
     * 设备类型编号
     */
    private String devTypeCode;
    /**
     * 设备编号
     */
    private String devId;
    /**
     * 设备名称
     */
    private String devName;

    /**
     * 设备状态
     */
    private String devStatus;
    
    /**
     * 设备IP
     */
    private String IP;
    /**
     * 发送包数
     */
    private int times = 0;
    /**
     * 超时时间
     */
    private int timeout;
    /**
     * 丢包率
     */
    private double lossPacketRate;
    /**
     * 平均响应时间
     */
    private int avgTime;
    /**
     * ping返回结果
     */
    private List<String> pingResult;

    public PingResultPojo() {
    }

    public PingResultPojo(String IP, int times, int timeout) {
        this.IP = IP;
        this.times = times;
        this.timeout = timeout;
    }

    public PingResultPojo(String IP, int times, int timeout, List<String> pingResult) {
        this.IP = IP;
        this.times = times;
        this.timeout = timeout;
        this.pingResult = pingResult;
    }

    public String getDevCategoryCode() {
		return devCategoryCode;
	}

	public void setDevCategoryCode(String devCategoryCode) {
		this.devCategoryCode = devCategoryCode;
	}

	public String getDevTypeCode() {
		return devTypeCode;
	}

	public void setDevTypeCode(String devTypeCode) {
		this.devTypeCode = devTypeCode;
	}

	public String getDevId() {
		return devId;
	}

	public void setDevId(String devId) {
		this.devId = devId;
	}

	public String getDevName() {
		return devName;
	}

	public void setDevName(String devName) {
		this.devName = devName;
	}

    public String getDevStatus() {
		return devStatus;
	}

	public void setDevStatus(String devStatus) {
		this.devStatus = devStatus;
	}
	
	public String getIP() {
        return IP;
    }

    public void setIP(String IP) {
        this.IP = IP;
    }

	public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public List<String> getPingResult() {
        return pingResult;
    }

    public void setPingResult(List<String> pingResult) {
        this.pingResult = pingResult;
    }

    public double getLossPacketRate() {
		return lossPacketRate;
	}

	public void setLossPacketRate(double lossPacketRate) {
		this.lossPacketRate = lossPacketRate;
	}
	
    public int getAvgTime() {
        return avgTime;
    }

    public void setAvgTime(int avgTime) {
        this.avgTime = avgTime;
    }

    @Override
    public String toString() {
        return TimeHelper.dateToLongString() + "**PingResultPojo{" +
                "IP='" + IP + '\'' +
                ", devId=" + devId +
                ", devName=" + devName +
                ", devTypeCode=" + devTypeCode +
                ", times=" + times +
                ", timeout=" + timeout +
                ", lossPacketRate=" + lossPacketRate +
                ", avgTime=" + avgTime +
                ", pingResult=" + pingResult +
                '}';
    }
}
